﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/User.Master" Inherits="System.Web.Mvc.ViewPage<VERKProjectHopur16.Models.UserQAModel>" %>
<%@ Import Namespace="VERKProjectHopur16.Helpers" %> 

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%: Lang.GetText("Menu", "My_Questions")%>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2><%: Lang.GetText("Menu", "My_Questions")%></h2>

    <div id="tabs">
        <ul>
            <li><a href="#fragment-1"><span><%: Lang.GetText("Menu", "AllQA") %></span></a></li>
            <li><a href="#fragment-2"><span><%: Lang.GetText("Menu", "Answered" )%></span></a></li>
            <li><a href="#fragment-3"><span><%: Lang.GetText("Menu", "Unanswered")%></span></a></li>

        </ul>
        <div id="fragment-1">
            <% foreach (var item in Model.allQuestions) 
            { %>
            <div class="qa">
                <em><%= Html.ActionLink(item.Question, "SingleQA", new { id = item.QAID })%></em>
                    <p><%: item.InsertDate.ToString("dddd, dd MMMM yyyy")%> - <%: item.Department.Name %></p>
            </div>
            <% } %>
        </div>
        <div id="fragment-2">
            <% foreach (var item in Model.answeredQuestions) 
            { %>
            <div class="qa">
                <em><%= Html.ActionLink(item.Question, "SingleQA", new { id = item.QAID })%></em>
                    <p><%: item.InsertDate.ToString("dddd, dd MMMM yyyy")%> - <%: item.Department.Name %></p>
            </div>
            <% } %>
        </div>
        <div id="fragment-3">
            <% foreach (var item in Model.UnansweredQuestions) 
            { %>
            <div class="qa">
                <em><%= Html.ActionLink(item.Question, "SingleQA", new { id = item.QAID })%></em>
                    <p><%: item.InsertDate.ToString("dddd, dd MMMM yyyy")%> - <%: item.Department.Name %></p>
            </div>
            <% } %>
        </div>
    </div> 
</asp:Content>
